<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    var a = ['tom','jack','frank'];
    var r = a.shift();
    a[0] = 'jack2';
    console.log(a);
    console.log(r);

</script>
</body>
</html>